
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zizhucan"></use>
                    </svg>
                    <div class="name">自助餐</div>
                    <div class="fontclass">#icon-zizhucan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-huo"></use>
                    </svg>
                    <div class="name">火</div>
                    <div class="fontclass">#icon-huo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shangchengxitongtubiaozitihuayuanwenjian61"></use>
                    </svg>
                    <div class="name">充值</div>
                    <div class="fontclass">#icon-shangchengxitongtubiaozitihuayuanwenjian61</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-erweima01"></use>
                    </svg>
                    <div class="name">二维码</div>
                    <div class="fontclass">#icon-erweima01</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tuikuan"></use>
                    </svg>
                    <div class="name">退款</div>
                    <div class="fontclass">#icon-tuikuan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-mima"></use>
                    </svg>
                    <div class="name">密码</div>
                    <div class="fontclass">#icon-mima</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-iconfuzhi"></use>
                    </svg>
                    <div class="name">二维码</div>
                    <div class="fontclass">#icon-iconfuzhi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-daifukuan"></use>
                    </svg>
                    <div class="name">待付款</div>
                    <div class="fontclass">#icon-daifukuan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shaokao"></use>
                    </svg>
                    <div class="name">烧烤</div>
                    <div class="fontclass">#icon-shaokao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shouyeshouye"></use>
                    </svg>
                    <div class="name">首页_首页</div>
                    <div class="fontclass">#icon-shouyeshouye</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-kuaican"></use>
                    </svg>
                    <div class="name">快餐</div>
                    <div class="fontclass">#icon-kuaican</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-iconfontneirongnf"></use>
                    </svg>
                    <div class="name">套餐</div>
                    <div class="fontclass">#icon-iconfontneirongnf</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-liwu"></use>
                    </svg>
                    <div class="name">礼物</div>
                    <div class="fontclass">#icon-liwu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-ribenliaoli"></use>
                    </svg>
                    <div class="name">日本料理</div>
                    <div class="fontclass">#icon-ribenliaoli</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xican"></use>
                    </svg>
                    <div class="name">西餐</div>
                    <div class="fontclass">#icon-xican</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tianpinyinliao"></use>
                    </svg>
                    <div class="name">甜品饮料</div>
                    <div class="fontclass">#icon-tianpinyinliao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zizhucan1"></use>
                    </svg>
                    <div class="name">自助餐</div>
                    <div class="fontclass">#icon-zizhucan1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-youhuiquan"></use>
                    </svg>
                    <div class="name">优惠券</div>
                    <div class="fontclass">#icon-youhuiquan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-iconfontfensi"></use>
                    </svg>
                    <div class="name">粉丝</div>
                    <div class="fontclass">#icon-iconfontfensi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qianbao"></use>
                    </svg>
                    <div class="name">钱包</div>
                    <div class="fontclass">#icon-qianbao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sousuo"></use>
                    </svg>
                    <div class="name">sousuo</div>
                    <div class="fontclass">#icon-sousuo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shequ"></use>
                    </svg>
                    <div class="name">社区</div>
                    <div class="fontclass">#icon-shequ</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yonghu"></use>
                    </svg>
                    <div class="name">用户</div>
                    <div class="fontclass">#icon-yonghu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jishiqiweishiyong"></use>
                    </svg>
                    <div class="name">计时器（未使用）</div>
                    <div class="fontclass">#icon-jishiqiweishiyong</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wode"></use>
                    </svg>
                    <div class="name">我的</div>
                    <div class="fontclass">#icon-wode</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhankai"></use>
                    </svg>
                    <div class="name">展开</div>
                    <div class="fontclass">#icon-zhankai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shouye"></use>
                    </svg>
                    <div class="name">shouye</div>
                    <div class="fontclass">#icon-shouye</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-caidan"></use>
                    </svg>
                    <div class="name">菜单</div>
                    <div class="fontclass">#icon-caidan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-26"></use>
                    </svg>
                    <div class="name">商家</div>
                    <div class="fontclass">#icon-26</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jifen"></use>
                    </svg>
                    <div class="name">积分</div>
                    <div class="fontclass">#icon-jifen</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-daifukuan1"></use>
                    </svg>
                    <div class="name">待付款</div>
                    <div class="fontclass">#icon-daifukuan1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shuxian"></use>
                    </svg>
                    <div class="name">DPI-竖线</div>
                    <div class="fontclass">#icon-shuxian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-iconfontxiaoxi1"></use>
                    </svg>
                    <div class="name">消息</div>
                    <div class="fontclass">#icon-iconfontxiaoxi1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-rili-copy"></use>
                    </svg>
                    <div class="name">日历</div>
                    <div class="fontclass">#icon-rili-copy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tixian"></use>
                    </svg>
                    <div class="name">提现</div>
                    <div class="fontclass">#icon-tixian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-can"></use>
                    </svg>
                    <div class="name">餐</div>
                    <div class="fontclass">#icon-can</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-iconshezhi"></use>
                    </svg>
                    <div class="name">icon-shezhi</div>
                    <div class="fontclass">#icon-iconshezhi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-kuaicanmeishi01"></use>
                    </svg>
                    <div class="name">快餐美食</div>
                    <div class="fontclass">#icon-kuaicanmeishi01</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tehui"></use>
                    </svg>
                    <div class="name">特惠</div>
                    <div class="fontclass">#icon-tehui</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-huoguo"></use>
                    </svg>
                    <div class="name">火锅</div>
                    <div class="fontclass">#icon-huoguo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-unie611"></use>
                    </svg>
                    <div class="name">收藏</div>
                    <div class="fontclass">#icon-unie611</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-lingdang"></use>
                    </svg>
                    <div class="name">铃铛</div>
                    <div class="fontclass">#icon-lingdang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xiaoxi"></use>
                    </svg>
                    <div class="name">消息</div>
                    <div class="fontclass">#icon-xiaoxi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fanhui"></use>
                    </svg>
                    <div class="name">fanhui</div>
                    <div class="fontclass">#icon-fanhui</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xican1"></use>
                    </svg>
                    <div class="name">西餐</div>
                    <div class="fontclass">#icon-xican1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xianshipeisong"></use>
                    </svg>
                    <div class="name">限时</div>
                    <div class="fontclass">#icon-xianshipeisong</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhankai1"></use>
                    </svg>
                    <div class="name">展开</div>
                    <div class="fontclass">#icon-zhankai1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jijiangkaishi"></use>
                    </svg>
                    <div class="name">即将开始</div>
                    <div class="fontclass">#icon-jijiangkaishi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yifahuo"></use>
                    </svg>
                    <div class="name">已发货</div>
                    <div class="fontclass">#icon-yifahuo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-hui"></use>
                    </svg>
                    <div class="name">惠</div>
                    <div class="fontclass">#icon-hui</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zuji-copy"></use>
                    </svg>
                    <div class="name">足迹</div>
                    <div class="fontclass">#icon-zuji-copy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-chuancai"></use>
                    </svg>
                    <div class="name">川菜</div>
                    <div class="fontclass">#icon-chuancai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-chuancai1"></use>
                    </svg>
                    <div class="name">川菜</div>
                    <div class="fontclass">#icon-chuancai1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-VIP"></use>
                    </svg>
                    <div class="name">VIP</div>
                    <div class="fontclass">#icon-VIP</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
